@import './reset';
@import './footer';

@function getvw($w) {
    @return calc($w / 750) * 100+vw;
}

$themColor: #ff9344;
$themWidth: getvw(710);

%column_center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

%between_center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container {
    width: 100vw;
    @extend %column_center;
    // 减去底部高度，防止内容被遮挡
    margin-bottom: getvw(135);

    header {
        width: $themWidth;
        margin-bottom: getvw(48);
        // background-color: pink;

        nav {
            @extend %between_center;
            margin: getvw(50) 0 getvw(20);

            .back {
                width: getvw(123);
                height: getvw(57);
                line-height: getvw(57);
                border: getvw(2) solid $themColor;
                border-radius: getvw(20);
                text-align: center;
                font-size: getvw(26);
            }

            &>p {
                font-size: getvw(26);
            }

            .selectBox {
                width: getvw(160);
                height: getvw(55);
                border: getvw(2) solid $themColor;
                display: flex;
                justify-content: space-around;
                align-items: center;
                font-size: getvw(26);

                img {
                    display: block;
                    width: getvw(30);
                }
            }
        }

        .searchBox {
            width: getvw(265);
            height: getvw(50);
            border: getvw(2) solid $themColor;
            border-radius: getvw(50);
            overflow: hidden;
            position: relative;
            margin-left: getvw(200);

            input {
                width: 100%;
                height: 100%;
                background-color: transparent;
                border: none;
                padding: 0 getvw(30);
                position: absolute;
                font-size: getvw(24);
                outline: none;
            }

            img {
                position: absolute;
                height: getvw(35);
                display: block;
                right: getvw(15);
                top: 50%;
                transform: translateY(-50%);
            }
        }

        .everyone {
            text-align: center;

            p {
                font-size: getvw(26);
                margin: getvw(33) 0 getvw(12);
            }

            ul {
                width: getvw(510);
                display: flex;
                justify-content: space-between;
                flex-wrap: wrap;
                // background-color: bisque;
                margin: 0 auto;

                li {
                    width: getvw(125);
                    height: getvw(65);
                    line-height: getvw(65);
                    background-color: #dcdcdc;
                    font-size: getvw(20);
                    color: #898989;
                    margin-top: getvw(3);
                }
            }
        }

    }

    main {
        width: 100vw;
        @extend %column_center;

        section {
            width: $themWidth;

            .con_title {
                display: flex;
                justify-content: space-between;
                align-items: center;
                // background-color: red;

                .ct_left {
                    display: flex;
                    align-items: center;
                    font-size: getvw(30);
                    // background-color: red;

                    img {
                        height: getvw(55);
                        display: block;
                    }
                }

                .ct_right {
                    display: flex;
                    align-items: center;
                    font-size: getvw(24);

                    img {
                        display: block;
                        height: getvw(25);
                        margin-left: getvw(8);
                    }
                }
            }

            // 热门搜索标题 icon 外边距
            &:first-child {
                .con_title {
                    .ct_left {
                        img {
                            margin: 0 getvw(25) 0 getvw(15);
                        }
                    }
                }
            }

            // 推荐搜索标题 icon 外边距
            &:last-child {
                .con_title {
                    .ct_left {
                        img {
                            margin: 0 getvw(17) 0 getvw(15);
                        }
                    }
                }
            }

            .con_hot {
                @extend %between_center;
                height: getvw(352);
                margin: getvw(35) 0 getvw(55);

                .hot_leftBox {
                    img {
                        display: block;
                        height: getvw(352);
                    }
                }

                .hot_rightBox {
                    width: getvw(420);
                    height: 100%;
                    // background-color: red;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;

                    .h_rightTop {
                        img {
                            display: block;
                            height: getvw(147);
                        }
                    }

                    .h_rightBottom {
                        @extend %between_center;

                        img {
                            display: block;
                            height: getvw(195);
                        }
                    }
                }
            }

            .con_recommend{
                margin: getvw(48) 0;
                ul{
                    @extend %between_center;
                    li{
                        img{
                            display: block;
                            height: getvw(200);
                        }
                    }
                }
            }
        }
    }
}